from functools import cmp_to_key

li=[32,94,128,1286,6,71]
def xy_cmp(x,y):
    if x+y<y+x:#当x>y时，进行交换
        return 1
    elif x+y>y+x:
        return -1
    else:
        return 0
def number_join(li):
    li=list(map(str,li))#(将列表字符串化)
    li.sort(key=cmp_to_key(xy_cmp))#进行排序(首字字符为主)
    return "".join(li)

print(number_join(li))